]> dgit.raspbian.org Git - gnome-shell.git/commit
Major rework of application data structures and caching
authorColin Walters <walters@verbum.org>
Tue, 7 Jul 2009 20:08:41 +0000 (16:08 -0400)
committerColin Walters <walters@verbum.org>
Wed, 8 Jul 2009 15:33:47 +0000 (11:33 -0400)
commitcc2d3fd56d64cf8d0afdebed8ed4806f1573acce
tree17a12efd57758761acf605a52f42822cf95394c1
parent72e6e7839feaebf26a9011cd3f5041a43eed5905
Major rework of application data structures and caching

Before, we looked up application data in several ways; the ShellAppSystem
exported just application ids (though it parsed the .desktop files internally),
and we'd create a Gio.DesktopAppInfo object (reparsing the desktop file again),
wrapping that inside a JavaScript AppInfo class, and finally the AppDisplay
would again parse the .desktop file to get the categories.

Also, to look up applications by id previously, we traversed the entire
menu structure each time.

Some qualities such as the NoDisplay flag were not easily exposed in the old
system.  And if we wanted to expose them we'd have to change several different
application information wrapper classes.

All in all, it was quite suboptimal.

The theme of this new code is basically "just use libgnome-menus".  We do
not call into Gio for app lookups anymore.  The new Shell.AppInfo class
is a disguised pointer for the GMenuTreeEntry item.

To fix the caching, we keep a simple hash table of desktop id -> ShellAppInfo.
configure.ac
js/misc/Makefile.am
js/misc/appInfo.js [deleted file]
js/ui/appDisplay.js
js/ui/widget.js
src/shell-app-monitor.c
src/shell-app-system.c
src/shell-app-system.h
src/shell-global.c
src/shell-global.h